import request from '@/router/axios'
import {getSCOrLCOrACC} from "../../commonCheck";
import {
  data_source_status,
  fenExYuangettoFixed, fenExYuangettoFixed2,
  getAudit_state_status,
  getData_source_status,
  getIs_have_bus_status,
  getLineName,
  getNotice_sate_status,
  getStationName,
  getSupp_state_status,
  getSys_data_source_status,
  getSwAuCondcutorReasonRemark,
  is_have_bus_status,
  notice_sate_status, numToTwoPoint, shoupiaoyuan_assitAuditSate,getshoupiaoyuan_assitAuditSate,swAuConductorReasonRemark,
  supp_state_status,
  sys_data_source_status

} from "../../commonCheck";

export function getOption() {
  return {
    emptyBtn: false,
    editBtn: false,
    delBtn: false,
    addBtn: false,
    border: true,
    index: true,
    indexLabel: '序号',
    page: true,
    align: 'center',
    menuWidth: 150,
    menuAlign: 'center',
    selection: true,
    searchLabelWidth:100,
    reserveSelection: false,
    height: 500,
    column: [
    // {
    //   fixed: true,
    //   label: '主键',
    //   prop: 'id',
    //   span: 24,
    //   hide: true
    // },
    {
      label: "线路",width: 100, prop: "lineCode", hide:true, search: false, searchslot: true, formatter: function (row, value, label, column) {
        return getLineName(value);
      }
    },

      {
        width: 180,
        label: "站点",
        prop: "stationCode",
        search: true,
        searchslot: true,
        formatter: function (row, value, label, column) {
          return getStationName(row.lineCode, value);
        }
      },

      {
        label: "售票员",
        prop: "conductorPersonName",
        type: 'input',
        search: true,
        searchslot: true,
        formatter: function (row, value, label, column) {
          if (row.isMergeRecord == 1) {
            return row.mergeConductorPersonName;
          }
          return value;
        }
      },
	 /*
	  {
      "type": "date",
      "label": "收入日期",
      "prop": "dates1",
	  hide: true,
      search:true,
      searchRange: true,
      searchSpan: 12,
	  width: 90,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dds',
      }, */
      {
        label: "收入日期", prop: "recordTime", type: 'date', search: false,
        width: 90, valueFormat: 'yyyy-MM-dd'
      },

      {
        label: "设备操作号",width: 120, prop: "equipmentNumber", formatter: function (row, value, label, column) {
          if (row.isMergeRecord == 1) {
            return row.mergeEquipmentNumber;
          }
          return value;
        }
      },

      {
        label: "BOM编号",width: 130, prop: "bomCode", formatter: function (row, value, label, column) {
          if (row.isMergeRecord == 1) {
            return row.mergeBomCode;
          }
          return value;
        }
      },

      {
        label: "实收金额", prop: "paidAmount", formatter: function (row, v) {
          return fenExYuangettoFixed(row, 'paidAmount');
        }
      },

      {
        label: "系统金额",width: 120, prop: "sysAmount", formatter: function (row, v) {
          return fenExYuangettoFixed(row, 'sysAmount');
        }
      },
      {
        label: "差异金额", prop: "differenceAmount", search: false, formatter: function (row, v) {
          return fenExYuangettoFixed(row, 'differenceAmount');
        }, type: 'select'
      },
      {
        label: "营销车票", width: 120,prop: "marketTicketAmount", formatter: function (row, v) {
          return fenExYuangettoFixed(row, 'marketTicketAmount');
        }
      },

      {
        label: "乘客事务", width: 120,prop: "passengerWorkAmount", formatter: function (row, v) {
          return fenExYuangettoFixed(row, 'passengerWorkAmount');
        }
      },

      {
        label: "预制单程票", width: 180,prop: "singleTicketAmount", formatter: function (row, v) {
          return fenExYuangettoFixed(row, 'singleTicketAmount');
        }
      },
      {
        label: "应急纸票", width: 180,prop: "emergencyAmount", formatter: function (row, v) {
          return fenExYuangettoFixed(row, 'emergencyAmount');
        }
      },
      {
        label: "系统数据来源", width: 140,prop: "sysDataSource", search: true, searchLabelWidth:100,dicData: sys_data_source_status(), type: 'select', formatter: function (row, v) {
          return getSys_data_source_status(v);
        }
      },

      {
        label: "数据来源",
        prop: "dataSource",
        type: 'select',
        search: true,
        dicData: data_source_status(),
        formatter: function (row, v) {
          return getData_source_status(v);
        }
      },

      {
        width: 120,
        label: "有无乘客事务",
        hide: true,
        prop: "isHaveBus",
        type: 'select',
        search: false,
        dicData: is_have_bus_status(),
        formatter: function (row, v) {
          return getIs_have_bus_status(v);
        }
      },

      {
        label: "审核状态", prop: "auditState", type: 'select', search: false,
        dicData: [{
          label: '审核通过',
          value: 1
        }, {
          label: '未审核',
          value: 0
        }], formatter: function (row, v) {
          return getAudit_state_status(v);
        }
      },
      {
        label: "确认通知状态",
         width: 120,
		prop: "noticeSate",
        type: 'select',
        search: true,
        dicData: notice_sate_status(),
        formatter: function (row, v) {
          if (v == '0') {
            return '待通知';
          }
          return getNotice_sate_status(v);
        }
      },
      // {
      //   label: "协查状态",
      //   prop: "assitAuditSate",
      //   type: 'select',
      //   search: true,
      //   dicData: shoupiaoyuan_assitAuditSate(),
      //   formatter: function (row, v) {
      //     return getshoupiaoyuan_assitAuditSate(v);
      //   },
      //   hide: true
      // },
      {
        width: 120,
        label: "补款状态",
        prop: "suppState",
        type: 'select',
        search: true,
        dicData: supp_state_status(),
        formatter: function (row, v) {
          return getSupp_state_status(v);
        }
      },
      {
        label: "结算开始日期", prop: "incomeSettleBeginTime", type: 'date',
        width: 120, format: 'yyyy-MM-dd'
      },

      {
        label: "结算结束日期", prop: "incomeSettleEndTime", type: 'date',
        width: 120, format: 'yyyy-MM-dd'
      },
	  {
        label: "上岗时间", prop: "guardTime", type: 'datetime',
        width: 120, format: 'yyyy-MM-dd HH:mm:ss'
      },
	  {
        label: "上岗结束时间", prop: "guardEndTime", type: 'datetime',
        width: 120, format: 'yyyy-MM-dd HH:mm:ss'
      },

      {label: "审核日期", width: 90, prop: "auditTime",  format: 'yyyy-MM-dd',  valueFormat: 'yyyy-MM-dd',  type:'date'},
      {label: "审核人", width: 90, prop: "auditPersonName"},
      {
        width: 160,
        searchLabelWidth:160,
        hide: false,
        label: '是否加入报表差错',
        prop: 'isAddReprotError',
        type:'select',
        search: false,
        formatter:function(row, value , label, column){
          return value==1?'是':value==0?'否':'';
        },
        dicData: [{
          label: '是',
          value: '1'
        },{
          label: '否',
          value: '0'
        }]
      },{
        hide: false,
        label: '报表差错修改状态',
        width: 160,
        searchLabelWidth:160,
        prop: 'isModify',
        formatter:function(row, value , label, column){
          return value==0?'待修改':value==1?'已完成':'';
        },
        dicData: [{
          label: '待修改',
          value: '0'
        },{
          label: '已完成',
          value: '1'
        }]
      },
      {
        width: 120,
        label: '是否补提交',
        prop: 'additionalRecordingStatus',
        type: 'select',
        search: true,
        searchLabelWidth:100,
        formatter:function(row, value , label, column){
          return value==1?'是':value==0?'否':'';
        },
        dicData: [{
          label: '否',
          value: '0'
        }, {
          label: '是',
          value: '1'
        }]
      },
	  {
      "type": "date",
      "label": "收入日期",
      "prop": "dates1",
	  hide: true,
      search:true,
      searchRange: true,
      searchSpan: 12,
	  width: 90,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dds',
      },

	  {
        width: 120,
        label: '录入人',
        prop: 'passengerJobName',
        type:'input',
      }, {
        width: 120,
        label: '录入人员工号',
        prop: 'passengerJobNo',
        type:'input',
      }, {
        width: 140,
        label: '提交时间',
        prop: 'createTime',
        type:'date',
        format: 'yyyy-MM-dd HH:mm',
        valueFormat: 'yyyy-MM-dd HH:mm:ss'
      },{
        width: 120,
        label: '报表差错更改人',
        prop: 'updateJobName',
        type:'input',
      }, {
        width: 120,
        label: '更改人工号',
        prop: 'updateJobNo',
        type:'input',
      }, {
        label: '更新时间',
        prop: 'updateTime',
        type:'date',
        format: 'yyyy-MM-dd HH:mm',
        valueFormat: 'yyyy-MM-dd HH:mm:ss'
      },{
        label: '补提交人',
        prop: 'repairSubmitJobName',
        type:'input',
      }, {
        label: '补提交人工号',
        width: 100,
        prop: 'repairSubmitJobNo',
        type:'input',
      }, {
        label: '补提交时间',
        width: 150,
        prop: 'repairSubmitTime',
        type:'date',
        format: 'yyyy-MM-dd HH:mm:ss',
        valueFormat: 'yyyy-MM-dd HH:mm:ss'
      },{
          label: '备注',
          prop: 'remark',
          width: 350,
          type: 'input'
        },{
          label: '修改原因备注',
          prop: 'reasonRemark',
          width: 150,
          type: 'select',
		  dicData: swAuConductorReasonRemark(),
          formatter: function (row, v) {
             return getSwAuCondcutorReasonRemark(v);
          }
        }, {
        label: '一日票',
        width: 100,
        prop: 'yxcpYrp',
        hide:true
      }, {
        label: '三日票',
        width: 100,
        prop: 'yxcpSrp',
        hide:true
      }, {
        label: '昭陵六骏三日票',
        width: 100,
        prop: 'yxcpZlljsrp',
        hide:true
      }, {
        label: '福利票',
        width: 100,
        prop: 'passageSpeical',
        hide:true
      }, {
        label: '付费出站票',
        width: 100,
        prop: 'passagePay',
        hide:true
      }, {
        label: '免费出站票',
        width: 100,
        prop: 'passageFree',
        hide:true
      }
    ]
  }
}

export function getAddOption(th) {
  return {
    submitBtn: th.showType != 3,
    emptyBtn: false,
    group: [
      {
        icon: '',
        label: '',
        // collapse: false,
        prop: 'group1',
        column: [{
          label: '线路',
          prop: 'lineCode',
          type: 'select',
          labelWidth: 130,
          formslot: true,
          rules: [{
            required: true,
            message: "请选择线路",
            trigger: "blur"
          }]
        }, {
          label: '站点',
          prop: 'stationCode',
          type: 'select',
          // width:250,
          labelWidth: 130,
          formslot: true,
          disabled: th.showType == 1,
          rules: [{
            required: true,
            message: "请选择站点",
            trigger: "blur"
          }]
        }, {
          label: '收入日期',
          prop: 'recordTime',
          // width:'250',
          labelWidth: 130,
          type: 'date',
          valueFormat: 'yyyy-MM-dd',
          disabled: th.showType == 1,
          pickerOptions: {
            disabledDate(time) {
              return time.getTime() > Date.now();
            },
          },
          rules: [{
            required: true,
            message: "请选择日期",
            trigger: "blur"
          }]
        }, {
          label: '售票员名称',
          prop: 'conductorPersonName',
          // width:'250',
          labelWidth: 130,
          type: 'select',
          formslot: true,
          disabled: th.showType == 1,
          rules: [{
            required: true,
            message: "请选择名称",
            trigger: "blur"
          }]
        }, {
          label: '售票员工号',
          prop: 'conductorJobNo',
          // width:'250',
          labelWidth: 130,
          type: 'input',
          disabled: true,
          formslot: true,
          rules: [{
            required: true,
            message: "请选择工号",
            trigger: "blur"
          }]
        }, {
          label: 'BOM编号',
          prop: 'bomCode',
          // width:'250',
          labelWidth: 130,
          type: 'input',
          disabled: th.showType == 1,
          rules: [{
            required: true,
            message: "请选择BOM",
            trigger: "blur"
          }]
        }, {
          label: '设备操作号',
          prop: 'equipmentNumber',
          // width:'250',
          labelWidth: 130,
          type: 'select',
          disabled: th.showType == 1,
          rules: [{
            required: true,
            message: "请选择设备",
            trigger: "blur"
          }],
          formslot: true,
        }, {
          label: '系统金额',
          prop: 'sysAmount',
          // width:'250',
          labelWidth: 130,
          type: 'number',
          formslot: true,
          rules: [{
            required: true,
            message: "请填写金额",
            trigger: "blur"
          }]
        }, {
          label: '差异金额',
          prop: 'differenceAmount',
          // width:'250',
          labelWidth: 130,
          type: 'number',
          formslot: true,
          disabled: th.showType == 1,
          rules: [{
            required: true,
            message: "请填写金额",
            trigger: "blur"
          }]
        }, {
          label: '实点金额',
          prop: 'paidAmount',
          // width:'250',
          labelWidth: 130,
          type: 'number',
          disabled: true,
          formslot: true,
          rules: [{
            required: true,
            message: "请填写金额",
            trigger: "blur"
          }]
        },  {
          label: '营销车票',
          prop: 'marketTicketAmount',
          // width:'250',
          labelWidth: 130,
          type: 'number',
          disabled: true,
          formslot: true,
          rules: [{
            required: true,
            message: "请填写营销车票金额",
            trigger: "blur"
          }]
        }, {
          label: '乘客事务',
          prop: 'passengerWorkAmount',
          // width:'250',
          labelWidth: 130,
          type: 'number',
          disabled: true,
          formslot: true,
          rules: [{
            required: true,
            message: "乘客事务金额",
            trigger: "blur"
          }]
        },{
          label: '预制单程票',
          prop: 'singleTicketAmount',
          // width:'250',
          labelWidth: 130,
          type: 'number',
          disabled: true,
          formslot: true,
          rules: [{
            required: true,
            message: "预制单程票现金金额",
            trigger: "blur"
          }]
        },{
          label: '应急纸票',
          prop: 'emergencyAmount',
          // width:'250',
          labelWidth: 130,
          type: 'number',
          disabled: true,
          formslot: true,
          rules: [{
            required: true,
            message: "应急纸票现金金额",
            trigger: "blur"
          }]
        },{
          label: '对比来源',
          prop: 'sysDataSource',
          // width:'250',
          labelWidth: 130,
          type: 'select',
          disabled: th.showType == 1,
          dicData: sys_data_source_status(),
          rules: [{
            required: true,
            message: "请选择来源",
            trigger: "blur"
          }]
        },{
          label: '备注',
          prop: 'remark',
          width: 350,
          labelWidth: 130,
          type: 'textarea',
          disabled: th.showType == 1,
        },{
          label: '修改原因备注',
          prop: 'reasonRemark',
          labelWidth: 130,
          type: 'textarea',
		  // dicData: swAuConductorReasonRemark(),
          // rules: [{
          //   required: true,
          //   message: "请选择修改原因备注",
          //   trigger: "blur"
          // }]
        }]
      },
    ]
  };
}


export function getMergeOption() {
  return {
    menu: false,
    refreshBtn: false,
    columnBtn: false,
    emptyBtn: false,
    editBtn: false,
    delBtn: false,
    addBtn: false,
    border: true,
    index: true,
    indexLabel: '序号',
    page: true,
    align: 'center',
    menuWidth: 150,
    menuAlign: 'center',
    selection: false,
    reserveSelection: true,
    column: [
      {label: "售票员", prop: "conductorPersonName"},

      {label: "售票员工号",width: 120, prop: "conductorJobNo"},

      {label: "设备操作号", width: 120,prop: "equipmentNumber"},

      {label: "bom编号", prop: "bomCode"},

      {
        label: "实收金额", prop: "paidAmount", formatter: function (row, v) {
          return fenExYuangettoFixed2(v);
        }
      },

      {
        label: "系统数据金额", width: 120,prop: "sysAmount", formatter: function (row, v) {
          return fenExYuangettoFixed2(v);
        }
      },


      {label: "结算开始日期",width: 120, prop: "incomeSettleBeginTime"},

      {label: "结算结束日期", width: 120,prop: "incomeSettleEndTime"},
    ]
  }
}


export function mondifyData(row, type) {
  let sc = {};
  sc.id = row.id;
  sc.auditState = row.auditState;
  sc.dataSource = 'SC';
  sc.sellAmount = fenExYuangettoFixed2(row.scSellAmount);
  sc.investAmount = fenExYuangettoFixed2(row.scInvestAmount);
  sc.faretkAmount = fenExYuangettoFixed2(row.scFaretkAmount);
  //合计金额（也就是系统金额） ：售票+充值+补票
  sc.heji = fenExYuangettoFixed2(row.scSellAmount + row.scInvestAmount + row.scFaretkAmount);
  // sc.chayi=fenExYuangettoFixed2(row.paidAmount-(row.scSellAmount+row.scInvestAmount+row.scFaretkAmount));
  //差异金额：实收 - 营销 - 退款 - 系统金额
  sc.chayi = numToTwoPoint(fenExYuangettoFixed2(row.paidAmount - row.marketTicketAmount - row.passengerWorkAmount - row.singleTicketAmount- row.emergencyAmount) - sc.heji);
  sc.type = 'sc';

  let lc = {};
  lc.id = row.id;
  lc.auditState = row.auditState;
  lc.dataSource = 'LC';
  lc.sellAmount = fenExYuangettoFixed2(row.lcSellAmount);
  lc.investAmount = fenExYuangettoFixed2(row.lcInvestAmount);
  lc.faretkAmount = fenExYuangettoFixed2(row.lcFaretkAmount);
  lc.heji = fenExYuangettoFixed2(row.lcSellAmount + row.lcInvestAmount + row.lcFaretkAmount);
  // lc.chayi=fenExYuangettoFixed2(row.paidAmount-(row.lcSellAmount+row.lcInvestAmount+row.lcFaretkAmount));
  lc.chayi = numToTwoPoint(fenExYuangettoFixed2(row.paidAmount - row.marketTicketAmount - row.passengerWorkAmount- row.singleTicketAmount- row.emergencyAmount) - lc.heji);
  lc.type = 'lc';

  let acc = {};
  acc.id = row.id;
  acc.auditState = row.auditState;
  acc.dataSource = 'ACC';
  acc.sellAmount = fenExYuangettoFixed2(row.accSellAmount);
  acc.investAmount = fenExYuangettoFixed2(row.accInvestAmount);
  acc.faretkAmount = fenExYuangettoFixed2(row.accFaretkAmount);
  acc.heji = fenExYuangettoFixed2(row.accSellAmount + row.accInvestAmount + row.accFaretkAmount);
  // acc.chayi=fenExYuangettoFixed2(row.paidAmount-(row.accSellAmount+row.accInvestAmount+row.accFaretkAmount));
  acc.chayi = numToTwoPoint(fenExYuangettoFixed2(row.paidAmount - row.marketTicketAmount - row.passengerWorkAmount- row.singleTicketAmount) - acc.heji);
  acc.type = 'acc';

  let spy = {};
  spy.id = row.id;
  spy.auditState = row.auditState;
  spy.dataSource = '售票员差异协查结果';
  // if(!type || type != "1"){
  spy.sellAmount = fenExYuangettoFixed2(row.saleoperatorSellAmount);
  spy.investAmount = fenExYuangettoFixed2(row.saleoperatorInvestAmount);
  spy.faretkAmount = fenExYuangettoFixed2(row.saleoperatorFaretkAmount);
  // spy.heji=fenExYuangettoFixed2(row.paidAmount-(row.saleoperatorSellAmount+row.saleoperatorInvestAmount+row.saleoperatorFaretkAmount));
  spy.heji = fenExYuangettoFixed2(row.saleoperatorSellAmount + row.saleoperatorInvestAmount + row.saleoperatorFaretkAmount);
  spy.chayi = numToTwoPoint(fenExYuangettoFixed2(row.paidAmount- row.marketTicketAmount - row.passengerWorkAmount- row.singleTicketAmount- row.emergencyAmount) - spy.heji);
  // }
  spy.type = 'spy';

  let res = [sc, lc, acc, spy];
  return res;
}


export function getReplaceOption() {
  return {
    refreshBtn: false,
    columnBtn: false,
    emptyBtn: false,
    editBtn: false,
    delBtn: false,
    addBtn: false,
    border: true,
    index: true,
    indexLabel: '序号',
    page: true,
    align: 'center',
    menuWidth: 150,
    menuAlign: 'center',
    selection: false,
    reserveSelection: true,
    column: [{
      fixed: true,
      label: '主键',
      prop: 'id',
      span: 24,
      hide: true
    },
      {label: "数据来源",width: 140, prop: "dataSource"},
      {label: "售票金额", prop: "sellAmount"},
      {label: "充值金额", prop: "investAmount"},
      {label: "补票金额", prop: "faretkAmount"},
      {label: "合计金额", prop: "heji"},
      {label: "差异金额", prop: "chayi"},

    ]
  }
}


function getDataSourceData(row, type, field) {
  let dataSource = row.dataSource;
  if (type == 1) { //名字
    if (dataSource == 1) {
      return 'SC';
    } else if (dataSource == 2) {
      return 'LC';
    } else if (dataSource == 3) {
      return 'ACC';
    } else if (dataSource == 4) {
      return '售票员差异协查结果';
    }
  } else if (type == 2) {// 数据
    if (dataSource == 1) {
      return row['sc' + field];
    } else if (dataSource == 2) {
      return row['lc' + field];
    } else if (dataSource == 3) {
      return row['acc' + field];
    } else if (dataSource == 4) {
      return row['saleoperator' + field];
    }
  }

}

export const tableOptionEditRecordsSC = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  align: 'center',
  menu: false,
  header: false,
  submitBtn: false,
  emptyBtn: false,
  labelWidth: 140,
  column: [ {
    label: "系统数据来源",
    prop: "sysDataSource",
    dicData: sys_data_source_status(),
    type: 'select',
    formatter: function (row, v) {
      return getSys_data_source_status(v);
    },
    disabled: true
    // hide: false,
    // label: '数据来源',
    // prop: 'sysDataSource',
    // formatter :function(row, value , label, column){
    //   return getSCOrLCOrACC(value);
    // },
    // type:'select',
    // dicData: [{
    //   label: 'SC',
    //   value: '1'
    // },{
    //   label: 'LC',
    //   value: '2'
    // },{
    //   label: 'ACC',
    //   value: '3'
    // },{
    //   label: '售票员协查',
    //   value: '4'
    // }]
  },
  //SC
  {
    label: '实收金额',
    prop: 'paidAmount',
    type: 'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    },
    display: false
  }, {
    label: '合计金额',
    prop: 'sysAmount',
    type:'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    },
    display: false
  }, {
    label: '差异金额',
    prop: 'differenceAmount',
    type:'number',
    formatter:function(row, value , label, column){
      var num =value / 100;
      num = num.toFixed(2);
      return num;
    },
    display: false
  }, {
    label: '系统金额更改人',
    prop: 'updateName',
    type:'input',
  }, {
    width: 120,
    label: '更改人工号',
    prop: 'updateId',
    type:'input',
  }, {
    label: '更新时间',
    prop: 'createTime',
    type:'date',
    format: 'yyyy-MM-dd HH:mm',
    valueFormat: 'yyyy-MM-dd HH:mm:ss'
  }]
}

//查看TVM分钱箱批量审核历史记录
export function queryPastRecords(param){
  return request({
    url: '/check/check/SwAuCenterConductorAmountDifferenceLogIdList/'+param.id,
    method: 'get'
  })
}

/**
 * 售票员票款差异审核主页
 * @param query
 */
export function getSwAuCenterConductorAmountDifferenceList(query) {
  return request({
    url: '/check/check/getSwAuCenterConductorAmountDifferenceList',
    method: 'post',
    params: query
  })
}

/**
 * 售票员票款差异审核主页-加入报表差错
 * @param query
 */
export function addReportErrorFromSPY(query) {
  return request({
    url: '/check/check/addReportErrorFromSPY',
    method: 'post',
    params: query
  })
}

/**
 * 添加
 * @param query
 */
export function addSwAuCenterConductorAmountDifference(query) {
  return request({
    url: '/check/check/addSwAuCenterConductorAmountDifference',
    method: 'post',
    params: query
  })
}

/**
 * 加入协查
 * @param query
 */
export function jiaRuXieCha(query) {
  return request({
    url: '/check/check/jiaRuXieCha',
    method: 'post',
    params: query
  })
}

/**
 * 加入协查
 * @param query
 */
export function jiaRuNotice(query) {
  return request({
    url: '/check/check/jiaRuNotice',
    method: 'post',
    params: query
  })
}

/**
 * 审批
 * @param query
 */
export function audit_state_pass(query) {
  return request({
    url: '/check/check/audit_state_pass',
    method: 'post',
    params: query
  })
}

/**
 * 合并数据
 * @param query
 */
export function mergePersonData(query) {
  return request({
    url: '/check/check/mergePersonData',
    method: 'post',
    params: query
  })
}

/**
 * 替换金额
 * @param query
 */
export function replaceSystemAmount(query) {
  return request({
    url: '/check/check/replaceSystemAmount',
    method: 'post',
    params: query
  })
}


/**
 * 修改数据
 * @param query
 */
export function updateSwAuCenterConductorAmountDifference(query) {
  return request({
    url: '/check/check/updateSwAuCenterConductorAmountDifference',
    method: 'post',
    params: query
  })
}

/**
 * 刷新数据
 * @param query
 */
export function spy_freshAmount(query) {
  return request({
    url: '/check/check/spy_freshAmount',
    method: 'post',
    params: query
  })
}

export function delObj (query) {
  return request({
    url: '/check/check/removeConductorByIds',
    method: 'get',
    params: query
  })
}

/**
 * 撤回
 * @param {} query
 * @returns
 */
export function revoke (query) {
  return request({
    url: '/check/check/revokeBomIds',
    method: 'put',
    params: query
  })
}

//作废BOM数据
export function cancellationBomDate(param){
  return request({
    url: '/check/check/cancellationBomDate',
    method: 'post',
    params: param
  })
}
